package cz.zcu.fav.rat.dataaccess.service;

import java.util.List;

import org.springframework.security.access.annotation.Secured;
import org.springframework.transaction.annotation.Transactional;

import cz.zcu.fav.rat.dataaccess.dao.GenericDAO;
import cz.zcu.fav.rat.beans.Object;

public interface ObjectService extends
		GenericDataAccessService<Object, GenericDAO<Object, Integer>>
{	
	List<Object> findAllObjectsByIdentifier(String identifier);
	
	@Override
	@Transactional(readOnly = false)
    @Secured("ROLE_ADMIN")
	Integer create(Object newInstance);
	
	@Override
	@Transactional(readOnly = false)
    @Secured("ROLE_ADMIN")
	void update(Object transientObject);
	
	@Override
	@Transactional(readOnly = false)
    @Secured("ROLE_ADMIN")
	void delete(Object persistentObject);
}
